#include "comm.hpp"
int main()
{

    int chmid = GetShm();
    char *shmaddr = (char *)shmat(chmid, nullptr, 0);
    int fd = open(FIFO_FILE, O_WRONLY);
    if (fd < 0)
    {
        perror("open");
        exit(FIFO_OPEN_ERR);
    }
    while (true)
    {
        cout << "please enter@";
        fgets(shmaddr, 4096, stdin);
        write(fd, "c", 1);
    }

    shmdt(shmaddr);

    return 0;
}